The technology presented herein relates to a storage medium having stored therein a game program and a game apparatus, and more particularly to a storage medium having stored therein a game program and a game apparatus in which an object, being a controlled object, is moved along a path inputted by the player.
A conventional game program in which an object appearing in a game space is moved along a path inputted by the player using a touch panel is know in the art (see, for example, Non-Patent Document 1 (“Instruction Manual of The legend of Zelda: Phantom Hourglass (Mugen No Sunadokei) ”, Nintendo Co., Ltd., Jun. 23, 2007, p. 32)). In this game program, while an object is moving along a path, if the object comes into a predetermined positional relationship with another object, the object moves off the path to automatically perform a predetermined action on the other object.
However, in the game program described in Non-Patent Document 1 identified above, after the finish of a predetermined action, the object is controlled so as to stop at the position at which the predetermined action was started. Therefore, in order to move the object thereafter, the player needs to again input a path, thus making the player's operation inefficient and time-consuming.
Therefore, a feature of an example embodiment presented herein is to provide a storage medium having stored therein a game program and a game apparatus in which the player can easily perform a game operation of moving an object by inputting a path.
The present embodiment has the following features. Here, the reference numerals, the supplementary description and the like in the parentheses indicate a correspondence with the embodiment described below in order to aid in understanding the present embodiment and are not intended to limit, in any way, the scope of the present invention.
The present embodiment is directed to a storage medium having stored therein a game program (71) to be executed by a computer (the CPU 31) in a game apparatus (1). The game program causes the computer to function as path detection means (the CPU 31 performing step S2; hereinafter, only step numbers will be indicated), movement control means (S43), action control means (S47), and return position determination means (S52). The path detection means detects a path inputted by a player. The movement control means moves an object (52), placed in a virtual game space, along the path. The action control means controls the object, which is moving along the path, to perform a predetermined action (mid-path action). The return position determination means determines, from among positions along the path, a return position (return point) at which the object, having finished the predetermined action, returns to the path. The movement control means resumes the movement of the object along the path after returning the object, having finished the predetermined action, to the return position (FIGS. 12 to 15).
According to the present embodiment, even if the object performs the predetermined action away from the path, the return position is determined by the return position determination means, and the movement of the object along the path is resumed by the movement control means. Therefore, even if the predetermined action is performed, the player does not need to again input a path, and the object can be moved up to the end of the path, which has been inputted before the predetermined action. Therefore, according to the present embodiment, the player is allowed to easily perform a game operation of moving an object by inputting a path, as compared with conventional techniques where the player needs to input a path each time a predetermined action is performed.
The action control means may control the object to perform, as the predetermined action, an action such that the object moves away from the path.
With such a configuration, the player can control the object to freely perform an operation away from the path, such as attacking an enemy object away from the path, or fetching an item away from the path.
The return position determination means may determine the return position based on a position of the object having finished the predetermined action, and a position of the path in the game space.
With such a configuration, the return position can be determined based on the position of the object having finished the predetermined action and the position of the path, and it is therefore possible to determine the return position to be a suitable position based on the positional relationship between the current position of the object (the position at the finish of the predetermined action) and the path.
The return position determination means may determine the return position based at least on a reaching distance or a reaching time that is needed to reach the return position from a position of the object having finished the predetermined action (S61, FIG. 12).
With such a configuration, it is also possible to determine the return position to be a position that can be reached within the shortest amount of time from the position at the finish of the predetermined action, for example. Therefore, by determining the return position based on the reaching distance or the reaching time, it is possible to efficiently move the object when returning the object to the path.
The game program may cause the computer to further function as original position storage means for storing a position of the object at a start of the predetermined action, in a memory of the game apparatus, as an original position (original point). In this case, the return position determination means determines the return position to be a position equal or subsequent to the original position (S62, S65).
With such a configuration, since the object returns to a position that is equal or subsequent to the position at the start of the predetermined action, the object will not pass through path portions that it has once passed through. Therefore, it is possible to efficiently move the object when returning the object to the path.
The action control means may control the object to perform an event action as the predetermined action when a predetermined event position set in the game space and a position of the object come into a predetermined positional relationship. In this case, the return position determination means determines the return position to be a position, from among positions along the path, that is equal or prior to a position at which the object performs the event action (S63, S65).
With such a configuration, when the object returns to the path, the object will not skip a position at which an event action is to be performed. That is, it is ensured that the object passes a position at which an event action is to be performed, and therefore the object can be controlled to perform an action as intended by the player, who has inputted a path such that the event action is to be performed by the object.
The game program may cause the computer to further function as event position storage means (S26) for storing, each time a new path is detected by the path detection means, the position at which the event action is performed from among positions along the path in a memory of the game apparatus. In this case, the action control means controls the object to perform the event action when the object reaches the event position stored in the memory.
With such a configuration, each time a path is inputted, any event position along the path is stored. Therefore, when the return position is determined, it is possible to determine a return position taking into consideration the stored event position.
The action control means determines, each time the object is moved, whether or not a positional relationship between a position of the object and a position of another object satisfies a predetermined condition (S44), and controls the object, which is being moved by the movement control means, to perform the predetermined action (S47) if the predetermined condition is satisfied.
With such a configuration, whether or not the object is controlled to perform the predetermined action is determined each time the object is moved (e.g., for each frame, if the object is moved every frame). Therefore, the predetermined action can be performed immediately in response to the movement of the object, and the determination can be made accurately based on the current positional relationship between the object and another object.
The game program may cause the computer to further function as nearest position selecting means (S61). The nearest position selecting means selects, from among positions along the path, a nearest position (nearest point) for which a reaching distance or a reaching time that is needed to reach the nearest position from a position of the object having finished the predetermined action is shortest. In this case, the return position determination means determines the nearest position as the return position.
With such a configuration, the object returns to a position that is closest, in terms of time or distance, to the position at the finish of the predetermined action. Therefore, it is possible to efficiently move the object when returning the object to the path.
The game program may cause the computer to further function as original position storage means (S45), and nearest position selecting means (S61). The original position storage means stores a position of the object at a start of the predetermined action, in a memory (32) of the game apparatus, as an original position (original point). The nearest position selecting means selects, from among positions along the path, a nearest position (nearest point) for which a reaching distance or a reaching time that is needed to reach the nearest position from a position of the object having finished the predetermined action is shortest. In this case, the action control means controls the object to perform an event action as the predetermined action when a predetermined event position set in the game space and a position of the object come into a predetermined positional relationship. The return position determination means determines the nearest position as the return position (S64) if the nearest position is equal or subsequent to the original position and equal or prior to the event position (YES in steps S62 and S63), and determines the original position as the return position (S65) if the nearest position is prior to the original position or subsequent to the event position (NO in step S62 or S63).
With such a configuration, since the object returns to a position that is equal or subsequent to the original position, the object will not pass through path portions that it has once passed through, and since the object returns to a position that is equal or prior to the position at which the event action is to be performed, the object will not return to the path while skipping the position. Therefore, it is possible to efficiently move the object when returning the object to the path, while ensuring that the object passes through the position at which the event action is to be performed, thus controlling the object to perform an action as intended by the player.
The game program may cause the computer to further function as point setting means (S25) for setting one or more points, from among points of the path, that are arranged at a predetermined distance interval or that are inputted at a predetermined time interval, as registered points. The return position determination means determines the return position from among the registered points.
With such a configuration, the return position is selected from among some points of the path, but not among all points of the path. Therefore, even where the return position is selected based on the reaching distance or the reaching time, the return position can be selected through a simple process.
The action control means may control the object, which is being moved by the movement control means, to perform the predetermined action if a positional relationship between a position of the object and a position of another object satisfies a predetermined condition.
With such a configuration, a predetermined action can be performed, for example, when the object, which is moving along the path, comes near another object. Therefore, while the object is moving along the path, for example, the object can be controlled to perform various actions, such as attacking an enemy object or obtaining an item object.
The present embodiment may also be embodied as a game apparatus having similar functions to those of the game apparatus set forth above. Note that in such a game apparatus, the various means may be implemented by a CPU executing a game program, or some or all of the various means may be implemented by a dedicated circuit or circuits of the game apparatus.
According to the present embodiment, even if an object, which is moving along a path, performs a predetermined action away from the path, the object is returned to the path and then the movement of the object along the path is resumed, and it is therefore possible to allow the player to easily perform a game operation of moving an object by inputting a path.
These and other features, aspects and advantages of the present invention will become more apparent from the following detailed description of the present embodiment when taken in conjunction with the accompanying drawings.